package com.gitee.bridge.abs;


import com.gitee.bridge.function.RegisterLoginFuncInterface;
import com.gitee.pojo.UserInfo;

import javax.servlet.http.HttpServletRequest;

/**
 * 用户登录 第三方登录
 * 抽象化角色 桥接模式中的桥
 *
 * @author acao
 * @since 2023-11-06 09:56
 */
public abstract class AbstractRegisterLoginComponent {

    //组合实现化角色
    protected RegisterLoginFuncInterface funcInterface;

    public AbstractRegisterLoginComponent(RegisterLoginFuncInterface funcInterface) {
        this.funcInterface = funcInterface;
    }

    public abstract String login(String username, String password);

    public abstract String register(UserInfo userInfo);

    public abstract boolean checkUserExists(String userName);

    public abstract String login3rd(HttpServletRequest request);
}
